/**
 * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

package com.vijayan.profile.model.impl;

import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler;
import com.liferay.portal.kernel.util.GetterUtil;
import com.liferay.portal.kernel.util.StringBundler;
import com.liferay.portal.kernel.util.StringPool;
import com.liferay.portal.model.impl.BaseModelImpl;
import com.liferay.portal.service.ServiceContext;

import com.liferay.portlet.expando.model.ExpandoBridge;
import com.liferay.portlet.expando.util.ExpandoBridgeFactoryUtil;

import com.vijayan.profile.model.MyExpectation;
import com.vijayan.profile.model.MyExpectationModel;
import com.vijayan.profile.model.MyExpectationSoap;

import java.io.Serializable;

import java.lang.reflect.Proxy;

import java.sql.Types;

import java.util.ArrayList;
import java.util.List;

/**
 * The base model implementation for the MyExpectation service. Represents a row in the &quot;kalyan_expectation&quot; database table, with each column mapped to a property of this class.
 *
 * <p>
 * This implementation and its corresponding interface {@link com.vijayan.profile.model.MyExpectationModel} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link MyExpectationImpl}.
 * </p>
 *
 * <p>
 * Never modify or reference this class directly. All methods that expect a my expectation model instance should use the {@link com.vijayan.profile.model.MyExpectation} interface instead.
 * </p>
 *
 * @author vijayan
 * @see MyExpectationImpl
 * @see com.vijayan.profile.model.MyExpectation
 * @see com.vijayan.profile.model.MyExpectationModel
 * @generated
 */
public class MyExpectationModelImpl extends BaseModelImpl<MyExpectation>
	implements MyExpectationModel {
	public static final String TABLE_NAME = "kalyan_expectation";
	public static final Object[][] TABLE_COLUMNS = {
			{ "exceptationId", new Integer(Types.BIGINT) },
			{ "profileId", new Integer(Types.BIGINT) },
			{ "minAge", new Integer(Types.INTEGER) },
			{ "maxAge", new Integer(Types.INTEGER) },
			{ "expectedReligion", new Integer(Types.VARCHAR) },
			{ "expectedCaste", new Integer(Types.VARCHAR) },
			{ "expectedSubCaste", new Integer(Types.VARCHAR) },
			{ "expectedCountry", new Integer(Types.VARCHAR) },
			{ "expectedState", new Integer(Types.VARCHAR) },
			{ "expectedCity", new Integer(Types.VARCHAR) },
			{ "expectedHeight", new Integer(Types.VARCHAR) },
			{ "expectedWeight", new Integer(Types.VARCHAR) },
			{ "expectedComplexion", new Integer(Types.VARCHAR) },
			{ "expectedLanguage", new Integer(Types.VARCHAR) },
			{ "expectedMaritalStatus", new Integer(Types.VARCHAR) },
			{ "expectationDetail", new Integer(Types.VARCHAR) }
		};
	public static final String TABLE_SQL_CREATE = "create table kalyan_expectation (exceptationId LONG not null primary key,profileId LONG,minAge INTEGER,maxAge INTEGER,expectedReligion VARCHAR(75) null,expectedCaste VARCHAR(75) null,expectedSubCaste VARCHAR(75) null,expectedCountry VARCHAR(75) null,expectedState VARCHAR(75) null,expectedCity VARCHAR(75) null,expectedHeight VARCHAR(75) null,expectedWeight VARCHAR(75) null,expectedComplexion VARCHAR(75) null,expectedLanguage VARCHAR(75) null,expectedMaritalStatus VARCHAR(75) null,expectationDetail VARCHAR(75) null)";
	public static final String TABLE_SQL_DROP = "drop table kalyan_expectation";
	public static final String DATA_SOURCE = "liferayDataSource";
	public static final String SESSION_FACTORY = "liferaySessionFactory";
	public static final String TX_MANAGER = "liferayTransactionManager";
	public static final boolean ENTITY_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get(
				"value.object.entity.cache.enabled.com.vijayan.profile.model.MyExpectation"),
			true);
	public static final boolean FINDER_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get(
				"value.object.finder.cache.enabled.com.vijayan.profile.model.MyExpectation"),
			true);

	/**
	 * Converts the soap model instance into a normal model instance.
	 *
	 * @param soapModel the soap model instance to convert
	 * @return the normal model instance
	 */
	public static MyExpectation toModel(MyExpectationSoap soapModel) {
		MyExpectation model = new MyExpectationImpl();

		model.setExceptationId(soapModel.getExceptationId());
		model.setProfileId(soapModel.getProfileId());
		model.setMinAge(soapModel.getMinAge());
		model.setMaxAge(soapModel.getMaxAge());
		model.setExpectedReligion(soapModel.getExpectedReligion());
		model.setExpectedCaste(soapModel.getExpectedCaste());
		model.setExpectedSubCaste(soapModel.getExpectedSubCaste());
		model.setExpectedCountry(soapModel.getExpectedCountry());
		model.setExpectedState(soapModel.getExpectedState());
		model.setExpectedCity(soapModel.getExpectedCity());
		model.setExpectedHeight(soapModel.getExpectedHeight());
		model.setExpectedWeight(soapModel.getExpectedWeight());
		model.setExpectedComplexion(soapModel.getExpectedComplexion());
		model.setExpectedLanguage(soapModel.getExpectedLanguage());
		model.setExpectedMaritalStatus(soapModel.getExpectedMaritalStatus());
		model.setExpectationDetail(soapModel.getExpectationDetail());

		return model;
	}

	/**
	 * Converts the soap model instances into normal model instances.
	 *
	 * @param soapModels the soap model instances to convert
	 * @return the normal model instances
	 */
	public static List<MyExpectation> toModels(MyExpectationSoap[] soapModels) {
		List<MyExpectation> models = new ArrayList<MyExpectation>(soapModels.length);

		for (MyExpectationSoap soapModel : soapModels) {
			models.add(toModel(soapModel));
		}

		return models;
	}

	public static final long LOCK_EXPIRATION_TIME = GetterUtil.getLong(com.liferay.util.service.ServiceProps.get(
				"lock.expiration.time.com.vijayan.profile.model.MyExpectation"));

	public MyExpectationModelImpl() {
	}

	public long getPrimaryKey() {
		return _exceptationId;
	}

	public void setPrimaryKey(long pk) {
		setExceptationId(pk);
	}

	public Serializable getPrimaryKeyObj() {
		return new Long(_exceptationId);
	}

	public long getExceptationId() {
		return _exceptationId;
	}

	public void setExceptationId(long exceptationId) {
		_exceptationId = exceptationId;
	}

	public long getProfileId() {
		return _profileId;
	}

	public void setProfileId(long profileId) {
		_profileId = profileId;
	}

	public int getMinAge() {
		return _minAge;
	}

	public void setMinAge(int minAge) {
		_minAge = minAge;
	}

	public int getMaxAge() {
		return _maxAge;
	}

	public void setMaxAge(int maxAge) {
		_maxAge = maxAge;
	}

	public String getExpectedReligion() {
		if (_expectedReligion == null) {
			return StringPool.BLANK;
		}
		else {
			return _expectedReligion;
		}
	}

	public void setExpectedReligion(String expectedReligion) {
		_expectedReligion = expectedReligion;
	}

	public String getExpectedCaste() {
		if (_expectedCaste == null) {
			return StringPool.BLANK;
		}
		else {
			return _expectedCaste;
		}
	}

	public void setExpectedCaste(String expectedCaste) {
		_expectedCaste = expectedCaste;
	}

	public String getExpectedSubCaste() {
		if (_expectedSubCaste == null) {
			return StringPool.BLANK;
		}
		else {
			return _expectedSubCaste;
		}
	}

	public void setExpectedSubCaste(String expectedSubCaste) {
		_expectedSubCaste = expectedSubCaste;
	}

	public String getExpectedCountry() {
		if (_expectedCountry == null) {
			return StringPool.BLANK;
		}
		else {
			return _expectedCountry;
		}
	}

	public void setExpectedCountry(String expectedCountry) {
		_expectedCountry = expectedCountry;
	}

	public String getExpectedState() {
		if (_expectedState == null) {
			return StringPool.BLANK;
		}
		else {
			return _expectedState;
		}
	}

	public void setExpectedState(String expectedState) {
		_expectedState = expectedState;
	}

	public String getExpectedCity() {
		if (_expectedCity == null) {
			return StringPool.BLANK;
		}
		else {
			return _expectedCity;
		}
	}

	public void setExpectedCity(String expectedCity) {
		_expectedCity = expectedCity;
	}

	public String getExpectedHeight() {
		if (_expectedHeight == null) {
			return StringPool.BLANK;
		}
		else {
			return _expectedHeight;
		}
	}

	public void setExpectedHeight(String expectedHeight) {
		_expectedHeight = expectedHeight;
	}

	public String getExpectedWeight() {
		if (_expectedWeight == null) {
			return StringPool.BLANK;
		}
		else {
			return _expectedWeight;
		}
	}

	public void setExpectedWeight(String expectedWeight) {
		_expectedWeight = expectedWeight;
	}

	public String getExpectedComplexion() {
		if (_expectedComplexion == null) {
			return StringPool.BLANK;
		}
		else {
			return _expectedComplexion;
		}
	}

	public void setExpectedComplexion(String expectedComplexion) {
		_expectedComplexion = expectedComplexion;
	}

	public String getExpectedLanguage() {
		if (_expectedLanguage == null) {
			return StringPool.BLANK;
		}
		else {
			return _expectedLanguage;
		}
	}

	public void setExpectedLanguage(String expectedLanguage) {
		_expectedLanguage = expectedLanguage;
	}

	public String getExpectedMaritalStatus() {
		if (_expectedMaritalStatus == null) {
			return StringPool.BLANK;
		}
		else {
			return _expectedMaritalStatus;
		}
	}

	public void setExpectedMaritalStatus(String expectedMaritalStatus) {
		_expectedMaritalStatus = expectedMaritalStatus;
	}

	public String getExpectationDetail() {
		if (_expectationDetail == null) {
			return StringPool.BLANK;
		}
		else {
			return _expectationDetail;
		}
	}

	public void setExpectationDetail(String expectationDetail) {
		_expectationDetail = expectationDetail;
	}

	public MyExpectation toEscapedModel() {
		if (isEscapedModel()) {
			return (MyExpectation)this;
		}
		else {
			return (MyExpectation)Proxy.newProxyInstance(MyExpectation.class.getClassLoader(),
				new Class[] { MyExpectation.class },
				new AutoEscapeBeanHandler(this));
		}
	}

	public ExpandoBridge getExpandoBridge() {
		if (_expandoBridge == null) {
			_expandoBridge = ExpandoBridgeFactoryUtil.getExpandoBridge(0,
					MyExpectation.class.getName(), getPrimaryKey());
		}

		return _expandoBridge;
	}

	public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
		getExpandoBridge().setAttributes(serviceContext);
	}

	public Object clone() {
		MyExpectationImpl clone = new MyExpectationImpl();

		clone.setExceptationId(getExceptationId());
		clone.setProfileId(getProfileId());
		clone.setMinAge(getMinAge());
		clone.setMaxAge(getMaxAge());
		clone.setExpectedReligion(getExpectedReligion());
		clone.setExpectedCaste(getExpectedCaste());
		clone.setExpectedSubCaste(getExpectedSubCaste());
		clone.setExpectedCountry(getExpectedCountry());
		clone.setExpectedState(getExpectedState());
		clone.setExpectedCity(getExpectedCity());
		clone.setExpectedHeight(getExpectedHeight());
		clone.setExpectedWeight(getExpectedWeight());
		clone.setExpectedComplexion(getExpectedComplexion());
		clone.setExpectedLanguage(getExpectedLanguage());
		clone.setExpectedMaritalStatus(getExpectedMaritalStatus());
		clone.setExpectationDetail(getExpectationDetail());

		return clone;
	}

	public int compareTo(MyExpectation myExpectation) {
		long pk = myExpectation.getPrimaryKey();

		if (getPrimaryKey() < pk) {
			return -1;
		}
		else if (getPrimaryKey() > pk) {
			return 1;
		}
		else {
			return 0;
		}
	}

	public boolean equals(Object obj) {
		if (obj == null) {
			return false;
		}

		MyExpectation myExpectation = null;

		try {
			myExpectation = (MyExpectation)obj;
		}
		catch (ClassCastException cce) {
			return false;
		}

		long pk = myExpectation.getPrimaryKey();

		if (getPrimaryKey() == pk) {
			return true;
		}
		else {
			return false;
		}
	}

	public int hashCode() {
		return (int)getPrimaryKey();
	}

	public String toString() {
		StringBundler sb = new StringBundler(33);

		sb.append("{exceptationId=");
		sb.append(getExceptationId());
		sb.append(", profileId=");
		sb.append(getProfileId());
		sb.append(", minAge=");
		sb.append(getMinAge());
		sb.append(", maxAge=");
		sb.append(getMaxAge());
		sb.append(", expectedReligion=");
		sb.append(getExpectedReligion());
		sb.append(", expectedCaste=");
		sb.append(getExpectedCaste());
		sb.append(", expectedSubCaste=");
		sb.append(getExpectedSubCaste());
		sb.append(", expectedCountry=");
		sb.append(getExpectedCountry());
		sb.append(", expectedState=");
		sb.append(getExpectedState());
		sb.append(", expectedCity=");
		sb.append(getExpectedCity());
		sb.append(", expectedHeight=");
		sb.append(getExpectedHeight());
		sb.append(", expectedWeight=");
		sb.append(getExpectedWeight());
		sb.append(", expectedComplexion=");
		sb.append(getExpectedComplexion());
		sb.append(", expectedLanguage=");
		sb.append(getExpectedLanguage());
		sb.append(", expectedMaritalStatus=");
		sb.append(getExpectedMaritalStatus());
		sb.append(", expectationDetail=");
		sb.append(getExpectationDetail());
		sb.append("}");

		return sb.toString();
	}

	public String toXmlString() {
		StringBundler sb = new StringBundler(52);

		sb.append("<model><model-name>");
		sb.append("com.vijayan.profile.model.MyExpectation");
		sb.append("</model-name>");

		sb.append(
			"<column><column-name>exceptationId</column-name><column-value><![CDATA[");
		sb.append(getExceptationId());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>profileId</column-name><column-value><![CDATA[");
		sb.append(getProfileId());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>minAge</column-name><column-value><![CDATA[");
		sb.append(getMinAge());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>maxAge</column-name><column-value><![CDATA[");
		sb.append(getMaxAge());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>expectedReligion</column-name><column-value><![CDATA[");
		sb.append(getExpectedReligion());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>expectedCaste</column-name><column-value><![CDATA[");
		sb.append(getExpectedCaste());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>expectedSubCaste</column-name><column-value><![CDATA[");
		sb.append(getExpectedSubCaste());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>expectedCountry</column-name><column-value><![CDATA[");
		sb.append(getExpectedCountry());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>expectedState</column-name><column-value><![CDATA[");
		sb.append(getExpectedState());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>expectedCity</column-name><column-value><![CDATA[");
		sb.append(getExpectedCity());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>expectedHeight</column-name><column-value><![CDATA[");
		sb.append(getExpectedHeight());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>expectedWeight</column-name><column-value><![CDATA[");
		sb.append(getExpectedWeight());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>expectedComplexion</column-name><column-value><![CDATA[");
		sb.append(getExpectedComplexion());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>expectedLanguage</column-name><column-value><![CDATA[");
		sb.append(getExpectedLanguage());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>expectedMaritalStatus</column-name><column-value><![CDATA[");
		sb.append(getExpectedMaritalStatus());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>expectationDetail</column-name><column-value><![CDATA[");
		sb.append(getExpectationDetail());
		sb.append("]]></column-value></column>");

		sb.append("</model>");

		return sb.toString();
	}

	private long _exceptationId;
	private long _profileId;
	private int _minAge;
	private int _maxAge;
	private String _expectedReligion;
	private String _expectedCaste;
	private String _expectedSubCaste;
	private String _expectedCountry;
	private String _expectedState;
	private String _expectedCity;
	private String _expectedHeight;
	private String _expectedWeight;
	private String _expectedComplexion;
	private String _expectedLanguage;
	private String _expectedMaritalStatus;
	private String _expectationDetail;
	private transient ExpandoBridge _expandoBridge;
}